package br.com.sismovimentacao.renderer;

import br.com.sismovimentacao.bean.Destino;
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

public class DestinoListCellRenderer extends DefaultListCellRenderer {

    @Override
    public Component getListCellRendererComponent(
            JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        if (value instanceof Destino) {
            Destino u = (Destino) value;
            setText(u.getDtcdesc());

        }
        return this;
    }
}
